package com.zzx.threekingdom.card;

import com.zzx.threekingdom.card.Pattern.Color;
import com.zzx.threekingdom.card.Pattern.Points;

public class PatternCard extends Card
{
    public Pattern pattern;
    
    public Pattern getPattern() {return pattern;};
    
    
    public PatternCard(Color color, Points points) { pattern = new Pattern(color, points); }
    public boolean isNACard() { return ((pattern.color==Color.NA)||(pattern.points==Points.NA)); }
    public boolean isRed() { return pattern.isRed(); }
    public static boolean isPatternCard(Card card) { return (card instanceof PatternCard); }
    public static boolean isRed(Card card) { return (card instanceof PatternCard)?((PatternCard)card).isRed(): false; }
    public String getPatternText()
    {
        return getPattern().getColorString() + getPattern().getPointsString()
            + " " + getName();
    }
    
    

}
